package cn.ssj.controller;

import cn.ssj.entity.Message;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2017-09-10.
 */
@RestController
@EnableAutoConfiguration
public class MessageController extends BaseController<Message,Integer> {

    @RequestMapping("/front/addMessage")
    public String add(Message entity) {
        return super.add(entity);
    }

    @RequestMapping("/back/deleteMessage")
    public String delete(@RequestParam("ids[]") Integer[] integers) {
        return super.delete(integers);
    }

    @RequestMapping("/back/queryAllMessageByPage")
    public String queryAllByPage(Integer pageNumber) {
        return super.queryAllByPage(pageNumber);
    }
}
